﻿namespace Attacher
{
    using Hardcodet.Wpf.TaskbarNotification;

    using Microsoft.Practices.Unity;

    internal class  ExceptionReportingServicesRegistrar : IExceptionReportingServicesRegistrar
    {
        #region Attributes

        private readonly IUnityContainer container;

        #endregion

        #region Public Methods

        public ExceptionReportingServicesRegistrar(IUnityContainer container)
        {
            ParameterChecker.IsNotNull(container, "container");

            this.container = container;
        }

        public void RegisterServices(TaskbarIcon taskbarIcon)
        {
            this.container.RegisterInstance<IUnhandledExceptionReportingService>(new UnhandledExceptionReportingService(taskbarIcon));
            this.container.RegisterInstance<IExceptionReportingService>(new ExceptionReportingService(taskbarIcon));
        }

        #endregion
    }
}
